{layout name="p/base"}
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>营地管理 <small>泊位信息列表</small></h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li><a href="/camp"><i class="fa fa-dashboard"></i> 营地信息列表</a></li>
          <li class="active"><i class="fa fa-table"></i> 泊位信息列表</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          这里可以添加、修改、删除泊位信息 
        </div>
        <h3 class="text-success">{$camp_list.name}</h3>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <div class="col-lg-12">
       <form class="form-horizontal" role="form" action="/camp/{$camp_id}/park" method="get">
        <div class="form-group input-group" style="width:40%;float:right;">
          <input class="form-control" type="text" name="keyword"/>
          <span class="input-group-btn">
            <button  type="submit" class="btn btn-default">搜索</button>
          </span>
        </div>
        <div class="form-group" style="float:right;margin-right:10px;">
          <select class="form-control" name="searchfield">
            <option value="park_number">按泊位编号</option>
            <option value="name">按泊位名称</option>
          </select>
        </div>
      </form>
        <div class="btn-group">
          <a href="park/create" class="btn btn-primary">添加泊位</a>
        </div>
        <div class="btn-group">
          <button type="button" id='del' class="btn btn-default">删除</button>
        </div>        
        <a href="/camp/{$camp_id}/park/del" class="btn btn-link">回收站</a>
        <a href="/camp/{$camp_id}/map" class="btn btn-link">泊位分布图</a>
        <div class="table-responsive">
          <table class="table table-bordered table-hover table-striped tablesorter">
            <thead>
              <tr>
                <th><div class="checker"><span><input type="checkbox" name=""></span></div></th>
                <th>泊位编号</th>
                <th>泊位名称</th>
                <th>所属营地</th>
                <th>所属会员账号</th>
                <th>状态</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
            <form id='delete' class="form-horizontal" role="form" action="/camp/{$camp_id}/park/delete" method="post">
            <input type="hidden" id='method' name="_method" value="DELETE">
            {volist name='list' id='vo'}
              <tr>
                <td><div class="checker"><span><input type="checkbox" name="ids[]" value="{$vo.id}"></span></div></td>
                <td>{$vo.park_number}</td>
                <td>{$vo.park_name}</td>
                <td>{$camp_list.name}</td>
                <td>{$vo.member}</td>
                <td>{$vo.use_state}</td>
                <td><a href="/camp/{$vo.camp_id}/park/{$vo.id}/edit">编辑</a></td>
              </tr>
            {/volist}
            </form>
            </tbody>
          </table>
        </div> 
      </div>
    {$list->render()}
    </div>
    <!-- /.row -->
    
  </div><!-- /#page-wrapper -->
<script type="text/javascript" src="/jquery.js"></script>
    <script type="text/javascript">
      $(document).ready(function(){
        $("#del").click(function(){
          $("#delete").submit();
          });
        });
    </script>

